<?php

class Zend_View_Helper_AccountLeftMenuAdmin {

    public $view;

    public function setView($view) {
        $this->view = $view;
    }

    public function accountLeftMenuAdmin($index, $position) {
        $auth = Zend_Auth::getInstance();
        $this->view->items = array(
            array('link' => $this->view->baseUrl('index.php/admin_user/account/list'), 'label' => 'Quản lý tài khoản', 'class' => $index==0?'selected':''),
            array('link' => $this->view->baseUrl('index.php/admin_user/account/list'), 'label' => 'Danh sách tài khoản', 'class' => $index==0?'sub':'hide'),
            array('link' => $this->view->baseUrl('index.php/admin_user/account/add'), 'label' => 'Thêm tài khoản', 'class' => $index==0?'sub':'hide'),
            array('link' => $this->view->baseUrl('index.php/admin_cms/catalog/list'), 'label' => 'Quản lý danh mục', 'class' => $index==3?'selected':''),
            array('link' => $this->view->baseUrl('index.php/admin_cms/catalog/list'), 'label' => 'Danh sách danh mục', 'class' => $index==3?'sub':'hide'),
            array('link' => $this->view->baseUrl('index.php/admin_cms/catalog/add'), 'label' => 'Thêm danh mục', 'class' => $index==3?'sub':'hide'),
            array('link' => $this->view->baseUrl('index.php/admin_cms/document/list'), 'label' => 'Quản lý tài liệu', 'class' => $index==6?'selected':''),
            array('link' => $this->view->baseUrl('index.php/admin_cms/document/list'), 'label' => 'Danh sách tài liệu', 'class' => $index==6?'sub':'hide'),
            array('link' => $this->view->baseUrl('index.php/admin_cms/document/add'), 'label' => 'Thêm tài liệu', 'class' => $index==6?'sub':'hide')
        );
        $this->view->addScriptPath(dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'scripts');
        $this->view->index = $index;
        $this->view->placeholder($position)->captureStart();
        echo $this->view->render('account_left_menu_admin.phtml');
        $this->view->placeholder($position)->captureEnd();
    }

}

?>
